#ifndef C0_TYPECHECKER_H
#define C0_TYPECHECKER_H

#include "main.h"

class TypeChecker : public ast::Visitor {
public:
    TypeChecker() = default;

    explicit TypeChecker(past node) : node(node) {}

    void visit(FuncDef *) override;

    void visit(UnaryExp *) override {}

    void visit(Block_list *) override {}

    void visit(CompUnit *) override {};

    void visit(Decl *) override {};

    void visit(expr *) override {};

    void visit(parameter *) override;

    void visit(Assign_Stmt *) override {};

    void visit(FuncDef_para *) override {};

    void visit(Return_Stmt *) override;

    void visit(VarDecl_list *) override {};

    void visit(FuncRParams_list *) override {};

    void visit(type *) override {};

    void visit(intValue *) override {};

    void visit(VarDecl *) override {};

    void visit(VarDef *) override {};

    void visit(IfElse_Stmt *) override{};

    void visit(If_Else *) override{};

    void visit(While_Stmt *) override{};

    static void checkMain();

private:
    past node{};
};


#endif //C0_TYPECHECKER_H
